import {
	http
} from "../utils/request";

const loginApi = {
	getToken(data) {
		let params = ""
		let keys = Object.keys(data);
		keys.forEach((key, index) => {
			params += `${key}=${data[key]}`;
			if (index < keys.length - 1) {
				params += "&";
			}
		});
		return http({
			contentType: "application/x-www-form-urlencoded",
			url: 'http://accountv4.xjznpt.cn/connect/token',
			method: "post",
			data: params
		})
	},
	getMyInfo(data) {
		return http({
			url: `http://rke.xjznpt.cn/Api/MobileApi/GetMyInfo`,
			method: "post",
			data
		})
	},
}
export default loginApi;